package com.arvato.minipro.service.mall;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.arvato.minipro.bean.bean_do.mall.CommodityEffectDo;
import com.arvato.minipro.bean.bean_dto.common.Query;
import com.arvato.minipro.mapper.mall.CommodityEffectMapper;

/**
 * Describe：商品和商品功能关联关系service
 * 
 * @author smallking
 *
 *  2018年2月8日
 */
@Service
@Transactional
public class CommodityEffectService {
	@Autowired
	private CommodityEffectMapper commodityEffectMapper;

	/**
	 * 插入关联关系
	 * @param commodityImg
	 * @return
	 */
	public int insert(CommodityEffectDo ce) {
		return commodityEffectMapper.insert(ce);
	}
	/**
	 * 删除关联关系
	 * @param commodityImg
	 * @return
	 */
	public int delete(Query query) {
		return commodityEffectMapper.deleteByQuery(query);
	}

}
